package com.cgydu.service;

import com.cgydu.entity.Message;
import com.cgydu.entity.User;

import java.sql.SQLException;

/**
 * projectName: day25_store
 * author: CGY
 * time: 2020/8/26 11:22
 * description:
 */
public interface UserService {
    /**
     * 检查账号是否存在！
     * @param username
     * @return 提示数据实体类
     */
    Message checkUser(String username) throws SQLException;

    /**
     * 注册业务！
     * @param user
     * @return 返回的状态码！ 0  1
     */
    int register(User user) throws SQLException;

    /**
     * 激活业务
     * @param code
     * @return
     */
    int activeUser(String code) throws SQLException;


    User login(String username, String password) throws SQLException;
}


